import Vue from 'vue'
import VueRouter from 'vue-router'
import QuestionTable from "@/components/QuestionTable";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/About')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },{
    path: '/selectWord',
    name: 'SelectWord',
    component: () => import('../views/SelectWord')
  },{
    path: '/wordTest',
    name: 'WordTest',
    component: () => import('../views/WordTest')
  },{
  //当匹配到一个路由时，参数值会被设置到 this.$route.params
    path: '/question',
    component: QuestionTable
  },{
    path: '/result',
    name: 'Result',
    component: () => import('../views/Result')
  }
]

const router = new VueRouter({
  routes
})

export default router
